//2009/09/02 22:41:18
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class Animation
{
public:
    vector <string> animate(int speed, string init)
    {
        vector<string> ret;
        int spd = 0;
        while (1)
        {
			string x(init.size(), '.');
			for(int i=0; i<init.size(); i++)
			{
				if(init[i] == 'L' && i>=spd) x[i-spd] = 'X';
				else if(init[i] == 'R' && i+spd<init.size()) x[i+spd] = 'X';
			}
			ret.push_back(x);
			if(x.find('X') == string::npos) break;
			spd += speed;
        }
		return ret;
    }
};
